<?php
	/* Description: This file is used to add sub sub category. */
	#########IncludeFiles####################################################################################
	include_once '../inc/config.php';
	include_once("../inc/bootstrape.php");
	require_once _SITE_PATH_.'classes/Vendor/Vendor.php';
	require_once _SITE_PATH_.'classes/Product/Product.php';
    require_once _SITE_PATH_.'classes/Category/Category.php';
	require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

	if( $_POST['submit']=='Submit'){   
		$parms['category_id'] = $_POST['category_id'];
        $parms['name'] = $_POST['name'];
		$parms['description'] = $_POST['description'];
		$parms['added'] = date("Y-m-d");
					
		if( CommonUtility::insertData($parms, 'category_attributes')) {        
			header("Location: product_attribute_mng.php?msg=1504");            
			exit;
		}
		$err = 1505;    
	}

	$editor = CommonUtility::includeEditor();

    $sub_sub_categories = array();
    $sub_sub_categories = Category::getSubSubCategories();
    
	$errMsg = $err;
	$_tplName = 'product/product_attribute_add.tpl';
	$_title = 'Add Product Attribute';

	require_once _ADMIN_TPL_MAIN_;
?>